﻿<ResourceDictionary
    x:Class="MilkifySkinResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:m="clr-namespace:Milkify"
    xmlns:md="clr-namespace:Milkify.Data" 
    xmlns:mcm="clr-namespace:Milkify.ComponentModel"
    mc:Ignorable="d">

    <!-- 
    ***************************************************************************
    Colour Palette
    ***************************************************************************
    -->
    
    <SolidColorBrush x:Key="MilkifyWhite" Color="#FFFFFF" />
    <SolidColorBrush x:Key="MilkifyBlack" Color="#000000" />
    <SolidColorBrush x:Key="MilkifyGray" Color="#EEEEEE" />
    <SolidColorBrush x:Key="MilkifyDarkGray" Color="#AAAAAA" />
    <SolidColorBrush x:Key="MilkifyRed" Color="#D75E4E" />
    <SolidColorBrush x:Key="MilkifyGreen" Color="#47A531" />
    <SolidColorBrush x:Key="MilkifyDarkGreen" Color="#007500" />
    
    <SolidColorBrush x:Key="MilkifyPopupColour" Color="#BD424242" />
    
    <SolidColorBrush x:Key="MilkifyPriorityOneColor" Color="#D75E4E" /><!-- Original RTM color for this is #EA5200 -->
    <SolidColorBrush x:Key="MilkifyPriorityTwoColor" Color="#0060BF" />
    <SolidColorBrush x:Key="MilkifyPriorityThreeColor" Color="#359AFF" />

    
    <!-- 
    ***************************************************************************
    Converters
    ***************************************************************************
    -->
    <mcm:PriorityToStringConverter
        x:Key="PriorityTextConverter"
        OneString="1"
        TwoString="2"
        ThreeString="3"/>
    <mcm:PriorityToStaticResourceConverter
        x:Key="PriorityColorConverter"
        OneResource="{StaticResource MilkifyPriorityOneColor}"
        TwoResource="{StaticResource MilkifyPriorityTwoColor}"
        ThreeResource="{StaticResource MilkifyPriorityThreeColor}" />


    <!-- 
    ***************************************************************************
    Generic Styles
    ***************************************************************************
    -->
    
    <Style x:Key="ButtonFocusVisualStyle">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border
                        CornerRadius="10"
                        BorderThickness="2"
                        Background="Transparent"
                        BorderBrush="{StaticResource MilkifyRed}"
                        />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource MilkifyGray}" />
        <Setter Property="Border.Margin" Value="1" />
        <Setter Property="Border.Padding" Value="12,6" />
        <Setter Property="Border.CornerRadius" Value="10" />
        <Setter Property="Border.BorderThickness" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border
                        Margin="{TemplateBinding Border.Margin}"
                        Padding="{TemplateBinding Border.Padding}"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        BorderBrush="{TemplateBinding Border.BorderBrush}"
                        BorderThickness="{TemplateBinding Border.BorderThickness}"
                        Background="{TemplateBinding Background}">
                        <ContentPresenter
                            RecognizesAccessKey="True"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}" 
                            Content="{TemplateBinding ContentControl.Content}"
                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisualStyle}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{StaticResource MilkifyRed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Background" Value="{StaticResource MilkifyWhite}" />
                <Setter Property="Border.BorderBrush" Value="{StaticResource MilkifyDarkGray}" />
                <Setter Property="Foreground" Value="{StaticResource MilkifyDarkGray}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="#000000" />
                <Setter Property="Border.BorderBrush" Value="#000000" />
                <Setter Property="Foreground" Value="#FFFFFF" />
            </Trigger>
        </Style.Triggers>
    </Style>
    
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border
                        x:Name="Bd"
                        Margin="1"
                        Padding="8,3"
                        CornerRadius="8"
                        BorderThickness="1"
                        BorderBrush="{StaticResource MilkifyGray}"
                        Background="{StaticResource MilkifyWhite}">
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Foreground="#000000"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource {x:Static SystemColors.ControlBrushKey}}" />
                            <Setter Property="TextElement.Foreground" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource MilkifyRed}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource MilkifyRed}" />
                            <Setter TargetName="Bd" Property="BorderThickness" Value="2" />
                            <Setter TargetName="Bd" Property="Padding" Value="7,2" />
                            <Setter TargetName="Bd" Property="Background">
                                <Setter.Value>
                                    <RadialGradientBrush Center="0.5,0.6" RadiusX="1.0" RadiusY="0.8" GradientOrigin="0.5,0.8">
                                        <GradientStop Color="Transparent" Offset="0" />
                                        <GradientStop Color="#DDDDDD" Offset="1" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Geometry x:Key="UpArrowGeometry">M 0 4 L 3.5 0 L 7 4 Z</Geometry>
    <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
    
    <Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border 
                        x:Name="Bd"
                        SnapsToDevicePixels="true" 
                        Background="{TemplateBinding Background}" 
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="8">
                        <Grid 
                            HorizontalAlignment="Right" 
                            Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                            <Path  
                                x:Name="Arrow"
                                Fill="Black"  
                                Margin="3,1,0,0" 
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center" 
                                Data="{StaticResource DownArrowGeometry}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="#000000"/>
        <Setter Property="Background" Value="{StaticResource MilkifyGray}"/>
        <Setter Property="BorderBrush" Value="{StaticResource MilkifyGray}"/>
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Border.CornerRadius" Value="8" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="Padding" Value="4,3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid 
                        x:Name="MainGrid" 
                        SnapsToDevicePixels="true"
                        Margin="{TemplateBinding Margin}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Popup Margin="1" x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2">
                            <Border 
                                x:Name="DropDownBorder" 
                                CornerRadius="8"
                                BorderThickness="1"
                                Margin="0,1"
                                Padding="0,8"
                                Background="{StaticResource MilkifyWhite}" 
                                BorderBrush="{StaticResource MilkifyDarkGray}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                MinWidth="{Binding Path=ActualWidth, ElementName=MainGrid}">
                                <ScrollViewer CanContentScroll="true">
                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
                                </ScrollViewer>
                            </Border>
                        </Popup>
                        <ToggleButton 
                            Style="{StaticResource ComboBoxReadonlyToggleButton}" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Grid.ColumnSpan="2" 
                            IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="false" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter Property="Background" Value="#FFF4F4F4"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{StaticResource MilkifyRed}" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused" Value="True">
                <Setter Property="Border.BorderBrush" Value="{StaticResource MilkifyRed}" />
                <Setter Property="Border.BorderThickness" Value="2" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Background" Value="{StaticResource MilkifyGray}" />
        <Setter Property="TextElement.Foreground" Value="Blue" />
        <Setter Property="BorderBrush" Value="{StaticResource MilkifyGray}" />
        <Setter Property="Border.BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border 
                        SnapsToDevicePixels="true"  
                        CornerRadius="8"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        Background="{TemplateBinding Background}">
                        <ContentPresenter 
                            Content="{TemplateBinding Content}" 
                            TextElement.Foreground="{TemplateBinding Foreground}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MilkifyRed}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="#000000" />
                            <Setter Property="TextElement.Foreground" Value="#FFFFFF" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="BorderBrush" Value="{StaticResource MilkifyGray}" />
        <Setter Property="Background" Value="{StaticResource MilkifyGray}" />
        <Setter Property="Border.BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border 
                        SnapsToDevicePixels="true" 
                        CornerRadius="8" 
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        Background="{TemplateBinding Background}" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MilkifyRed}" />
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter Property="Background" Value="#000000" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle 
                        Fill="{TemplateBinding Background}" 
                        Width="{TemplateBinding Width}" 
                        Height="{TemplateBinding Height}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Background" Value="#FFFFFF"/>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
        <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
        <Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="Margin" Value="10,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid 
                        x:Name="Bg" 
                        SnapsToDevicePixels="true"
                        Background="{TemplateBinding Background}" 
                        TextElement.Foreground="{TemplateBinding TextElement.Foreground}">
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                            <RowDefinition Height="0.00001*"/>
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                        </Grid.RowDefinitions>
                        <RepeatButton 
                            Style="{StaticResource ScrollBarButton}" 
                            IsEnabled="{TemplateBinding IsMouseOver}" 
                            Command="{x:Static ScrollBar.LineUpCommand}"
                            TextElement.Foreground="{TemplateBinding TextElement.Foreground}">
                            <Path
                                Fill="{TemplateBinding TextElement.Foreground}"
                                HorizontalAlignment="Center" 
                                VerticalAlignment="Center" 
                                Data="{StaticResource UpArrowGeometry}"/>
                        </RepeatButton>
                        <Track 
                            x:Name="PART_Track" 
                            IsEnabled="{TemplateBinding IsMouseOver}" 
                            Grid.Row="1" 
                            IsDirectionReversed="true">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton 
                                    Style="{StaticResource VerticalScrollBarPageButton}" 
                                    Command="{x:Static ScrollBar.PageUpCommand}"/>
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton 
                                    Style="{StaticResource VerticalScrollBarPageButton}" 
                                    Command="{x:Static ScrollBar.PageDownCommand}"/>
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource ScrollBarThumb}" />
                            </Track.Thumb>
                        </Track>
                        <RepeatButton 
                            Style="{StaticResource ScrollBarButton}" 
                            IsEnabled="{TemplateBinding IsMouseOver}" 
                            Grid.Row="2" 
                            Command="{x:Static ScrollBar.LineDownCommand}">
                            <Path
                                Fill="{TemplateBinding TextElement.Foreground}"
                                HorizontalAlignment="Center" 
                                VerticalAlignment="Center" 
                                Data="{StaticResource DownArrowGeometry}"/>
                        </RepeatButton>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="Bg" Value="{StaticResource MilkifyDarkGray}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto"/>
                <Setter Property="MinWidth" Value="0"/>
                <Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="Background" Value="{StaticResource MilkifyGray}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Grid x:Name="Bg" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                    <ColumnDefinition Width="0.00001*"/>
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                </Grid.ColumnDefinitions>
                                <RepeatButton 
                                    Style="{StaticResource ScrollBarButton}" 
                                    IsEnabled="{TemplateBinding IsMouseOver}" 
                                    Command="{x:Static ScrollBar.LineLeftCommand}"/>
                                <Track 
                                    x:Name="PART_Track" 
                                    IsEnabled="{TemplateBinding IsMouseOver}" 
                                    Grid.Column="1">
                                    <Track.DecreaseRepeatButton>
                                        <RepeatButton 
                                            Style="{StaticResource HorizontalScrollBarPageButton}" 
                                            Command="{x:Static ScrollBar.PageLeftCommand}"/>
                                    </Track.DecreaseRepeatButton>
                                    <Track.IncreaseRepeatButton>
                                        <RepeatButton 
                                            Style="{StaticResource HorizontalScrollBarPageButton}" 
                                            Command="{x:Static ScrollBar.PageRightCommand}"/>
                                    </Track.IncreaseRepeatButton>
                                    <Track.Thumb>
                                        <Thumb Style="{StaticResource ScrollBarThumb}" />
                                    </Track.Thumb>
                                </Track>
                                <RepeatButton 
                                    Style="{StaticResource ScrollBarButton}" 
                                    IsEnabled="{TemplateBinding IsMouseOver}" 
                                    Grid.Column="2" 
                                    Command="{x:Static ScrollBar.LineRightCommand}"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Background" TargetName="Bg" Value="{StaticResource MilkifyDarkGray}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>


    <ControlTemplate x:Key="CheckBoxControlTemplate">
        <BulletDecorator>
            <BulletDecorator.Bullet>
                <Grid>
                    <Border 
                      Width="18"
                      Height="18" 
                      CornerRadius="4"
                      BorderThickness="2"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      Background="{StaticResource MilkifyWhite}"
                      HorizontalAlignment="Center" 
                      VerticalAlignment="Center" />
                    <Rectangle
                      Width="6"
                      Height="6"
                      Fill="Black" 
                      Name="RectCheck"
                      HorizontalAlignment="Center" 
                      VerticalAlignment="Center" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter 
              RecognizesAccessKey="True" 
              Content="{TemplateBinding ContentControl.Content}" 
              ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
              Margin="{TemplateBinding Control.Padding}" 
              HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
              VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
              SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
        </BulletDecorator>
        <ControlTemplate.Triggers>
            <Trigger Property="CheckBox.IsChecked" Value="False">
                <Setter TargetName="RectCheck" Property="Visibility" Value="Hidden" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="Template" Value="{StaticResource CheckBoxControlTemplate}" />
        <Setter Property="Border.BorderBrush" Value="{StaticResource MilkifyGray}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Border.BorderBrush" Value="{StaticResource MilkifyRed}" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid>
                        <Border
                            Name="Bd"
                            Background="{StaticResource MilkifyGray}"
                            BorderBrush="{StaticResource MilkifyGray}"
                            BorderThickness="0"
                            CornerRadius="6,6,0,0" >
                            <ContentPresenter 
                                Name="Ct"
                                TextElement.Foreground="{StaticResource MilkifyBlack}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                ContentSource="Header"
                                Margin="12,2,12,2"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="Bd" Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bd" Property="Border.Background" Value="{StaticResource MilkifyRed}" />
                        </Trigger>
                        <Trigger SourceName="Bd" Property="IsMouseOver" Value="False">
                            <Setter TargetName="Bd" Property="Border.Background" Value="{StaticResource MilkifyGray}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="{StaticResource MilkifyGreen}" />
                            <Setter TargetName="Bd" Property="Border.BorderThickness" Value="1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel
                            Grid.Row="0"
                            Panel.ZIndex="1"
                            Margin="0,0,4,-1"
                            IsItemsHost="True"
                            Background="Transparent" />
                        <Border
                            Grid.Row="1"
                            Background="{StaticResource MilkifyWhite}"
                            BorderBrush="{StaticResource MilkifyGray}"
                            BorderThickness="1"
                            CornerRadius="0, 8, 8, 8" >
                            <ContentPresenter ContentSource="SelectedContent" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
    ***************************************************************************
    Main Window Styles
    ***************************************************************************
    -->
    
    <!-- Window and window border -->
    <Style x:Key="MainWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="FontFamily" Value="./Fonts/#Myriad Pro" />
        <Setter Property="Icon">
            <Setter.Value>
                <ImageSource>./MilkifyLogo.png</ImageSource>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MainWindowBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="8" />
        <Setter Property="BorderThickness" Value="1" />
        <!--<Setter Property="Background" Value="{StaticResource MilkifyWhite}" />-->
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush MappingMode="Absolute" StartPoint="0,0" EndPoint="0,50">
                    <GradientStop Color="#EFEFEF" Offset="0" />
                    <GradientStop Color="#FFFFFF" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource MilkifyDarkGray}" />
        <Setter Property="Padding" Value="5" />
    </Style>
    <Style x:Key="MainWindowInnerStyle" TargetType="{x:Type Panel}">
        <!--<Setter Property="Control.Background" Value="#FFFFFF" />-->
    </Style>

    <!-- The title bar area -->
    <Style x:Key="TitleBarStyle" TargetType="{x:Type Panel}"/>
    <Style x:Key="ApplicationTitleStyle" TargetType="{x:Type Label}">
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush 
                    ImageSource="MilkifyLogo.png"
                    Stretch="Uniform"
                    TileMode="None"
                    AlignmentX="Left"
                    AlignmentY="Center" />
            </Setter.Value>
        </Setter>
        <Setter Property="Height" Value="30" />
        <Setter Property="Padding" Value="30,0,0,0" />
        <Setter Property="FontFamily" Value="./Fonts/#Kristen ITC" />
        <Setter Property="FontSize" Value="15" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style x:Key="AccountNameStyle" TargetType="{x:Type Label}">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style x:Key="AccountHyperlinkStyle" TargetType="{x:Type TextBlock}"/>
    
    <Style x:Key="TitleBarButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="Background" Value="#FFFFFF" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid
                        Margin="1">
                        <Ellipse 
                            Width="20"
                            Height="20"
                            Fill="{TemplateBinding Background}" />
                        <ContentPresenter
                            Content="{TemplateBinding ContentControl.Content}"
                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                            HorizontalAlignment="Center" 
                            VerticalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="#FFFFFF" />
                <Setter Property="Background" Value="#000000" />
            </Trigger>
        </Style.Triggers>
    </Style>
	<DataTemplate x:Key="AboutButtonContentTemplate">
		<Grid Margin="0,0,0,0" Width="15" Height="15">
			<Path 
				Fill="{TemplateBinding Control.Foreground}" 
				Stretch="Uniform" 
                VerticalAlignment="Center"
				Data="M 41.71875 1025.4091 L 19.45313 1025.4091 L 19.45313 1023.1825 C 19.45311 1019.3935 19.88279 1016.3173 20.74219 1013.954 C 21.60154 1011.5907 22.88084 1009.4325 24.58008 1007.4794 C 26.27927 1005.5263 30.09763 1002.0888 36.03516 997.16687 C 39.19918 994.5888 40.78121 992.22552 40.78125 990.07702 C 40.78121 987.92865 40.14644 986.25873 38.87696 985.06726 C 37.60738 983.87592 35.68356 983.28022 33.10547 983.28015 C 30.332 983.28022 28.03708 984.19818 26.22071 986.03405 C 24.40427 987.87006 23.24216 991.07318 22.73438 995.64343 L 0 992.83093 C 0.78125 984.47162 3.81836 977.74311 9.11133 972.64538 C 14.40428 967.54781 22.51951 964.99899 33.45703 964.9989 C 41.97261 964.99899 48.84761 966.77633 54.08203 970.33093 C 61.19134 975.13569 64.74603 981.54194 64.7461 989.54968 C 64.74603 992.87005 63.82806 996.07317 61.99219 999.15905 C 60.15619 1002.245 56.40619 1006.0146 50.74219 1010.4677 C 46.79683 1013.5927 44.3066 1016.1025 43.27149 1017.9969 C 42.23629 1019.8915 41.71871 1022.3622 41.71875 1025.4091 L 41.71875 1025.4091 z M 18.69141 1031.327 L 42.53907 1031.327 L 42.53907 1052.3622 L 18.69141 1052.3622 L 18.69141 1031.327 z" />
		</Grid>
	</DataTemplate>
    <Style x:Key="AboutButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource TitleBarButtonStyle}">
        <Setter Property="ContentTemplate" Value="{StaticResource AboutButtonContentTemplate}" />
    </Style>
    <DataTemplate x:Key="MinimizeButtonContentTemplate">
        <Grid Width="15" Height="15" Margin="0,0,0,0">
            <Path 
                Fill="{TemplateBinding Control.Foreground}"
				        Margin="0,0,0,0"
				        Stretch="Uniform"
				        VerticalAlignment="Bottom"
                Data="M67.293222,-41.422889 L0,20.71875 C42.74244,86.91617 117.17736,130.78127 201.78125,130.78127 286.38514,130.78127 360.82006,86.91617 403.5625,20.71875 L336.26928,-41.422889 C303.14075,2.4297206 260.937,32.867005 201.78125,32.867005 142.6255,32.867005 100.42175,2.4297206 67.293222,-41.422889 z" Height="6.401" />
        </Grid>
    </DataTemplate>
    <Style x:Key="MinimizeButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource TitleBarButtonStyle}">
        <Setter Property="ContentTemplate" Value="{StaticResource MinimizeButtonContentTemplate}" />
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Control.Foreground" Value="Gray" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <DataTemplate x:Key="CloseButtonContentTemplate">
        <Grid>
            <Rectangle Fill="{TemplateBinding Control.Foreground}" Width="15" Height="4">
                <Rectangle.RenderTransform>
                    <RotateTransform Angle="45" CenterX="7.5" CenterY="2" />
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle Fill="{TemplateBinding Control.Foreground}" Width="15" Height="4">
                <Rectangle.RenderTransform>
                    <RotateTransform Angle="-45" CenterX="7.5" CenterY="2" />
                </Rectangle.RenderTransform>
            </Rectangle>
        </Grid>
    </DataTemplate>
    <Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource TitleBarButtonStyle}">
        <Setter Property="ContentTemplate" Value="{StaticResource CloseButtonContentTemplate}" />
    </Style>

    <!-- The main content area -->
    <Style x:Key="ContentStyle" TargetType="{x:Type ContentControl}">
        <Setter Property="Padding" Value="0,10,0,10" />
    </Style>

    <!-- The main content's header area -->
    <Style x:Key="ContentHeaderStyle" TargetType="{x:Type Panel}"/>
    <Style x:Key="BackButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style x:Key="PageTitleTextStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="./Fonts/#Myriad Pro" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Margin" Value="5" />
    </Style>
    <Style x:Key="HomeButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <DataTemplate x:Key="RefreshButtonContentTemplate">
        <Grid Width="15" Height="15">
            <Path
                Fill="{TemplateBinding Control.Foreground}"
                Stretch="Uniform"
                Data="M91.857 220.326c38.964 32.694 96.984 27.727 129.845-11.014l30.34 25.458  c-46.919 55.496-129.922 62.644-185.64 15.891c-55.846-46.86-63.13-130.12-16.27-185.966c46.86-55.846 130.12-63.13 185.966-16.27  l-0.141 0.167l0.79 0.663l13.642-16.258l30.126 78.806l-82.84-15.984l13.642-16.258l-0.993-0.833l0.112-0.134  c-39.09-32.613-97.224-27.47-129.969 11.554C47.666 129.242 52.765 187.524 91.857 220.326z"/>
        </Grid>
    </DataTemplate>
    <Style x:Key="RefreshButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Control.Foreground" Value="Black" />
        <Setter Property="ContentTemplate" Value="{StaticResource RefreshButtonContentTemplate}"/>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Control.Foreground" Value="{StaticResource MilkifyDarkGray}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    

    <!-- The panel at the bottom that contains the search area, add task button, etc. -->
    <Style x:Key="FunctionsBarStyle"></Style>
    
    <!-- Progress bar that shows the ongoing web requests progress -->
    <Style x:Key="RequestProgressStyle" TargetType="{x:Type ProgressBar}">
        
    </Style>


    <!-- 
    ***************************************************************************
    Page Content Styles
    ***************************************************************************
    -->

    <!-- Authentication page styles -->
    <Style x:Key="AuthenticateLinkStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Margin" Value="10,20" />
        <Setter Property="FontSize" Value="20" />
    </Style>


    <!-- The special buttons -->
    <Style x:Key="PageButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="Margin" Value="1" />
    </Style>
    <Style x:Key="TaskListButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource PageButtonStyle}"/>
    <Style x:Key="TaskButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource PageButtonStyle}"/>
    <Style x:Key="TaskNoteButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource PageButtonStyle}"/>

    <!-- The special lists -->
    <Style x:Key="ScrollingItemsControlStyle" TargetType="{x:Type ItemsControl}">
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
    </Style>
    <Style x:Key="HomeListStyle" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ScrollingItemsControlStyle}"/>
    <Style x:Key="WeekListStyle" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ScrollingItemsControlStyle}"/>
    <Style x:Key="TaskListItemContainerStyle" TargetType="{x:Type ContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border
                        CornerRadius="10"
                        Background="Transparent"
                        BorderThickness="{TemplateBinding Border.BorderThickness}"
                        BorderBrush="{StaticResource MilkifyGreen}">
                        <ContentPresenter 
                            VerticalAlignment="Stretch" 
                            HorizontalAlignment="Stretch"
                            Content="{TemplateBinding ContentControl.Content}"
                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                            SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisualStyle}" /><!-- The same as the FocusVisualStyle for Buttons, so that it looks the same whether buttons are in ListBoxes or ItemsControls -->
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected" Value="True">
                <Setter Property="Border.BorderThickness" Value="1" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TaskListStyle" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ScrollingItemsControlStyle}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource TaskListItemContainerStyle}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <ScrollViewer
                        Focusable="False">
                        <ItemsPresenter
                            SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TaskListListStyle" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ScrollingItemsControlStyle}"/>
    <Style x:Key="TaskNoteListStyle" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ScrollingItemsControlStyle}">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
    </Style>
    
    <Style x:Key="TaskListPanelStyle">
        <Setter Property="Control.Padding" Value="3" />
    </Style>
    <Style x:Key="TaskListSortAndFilterPanelStyle" TargetType="{x:Type Panel}" BasedOn="{StaticResource TaskListPanelStyle}"></Style>
    <Style x:Key="TaskListFunctionsPanelStyle" TargetType="{x:Type Panel}" BasedOn="{StaticResource TaskListPanelStyle}"></Style>
    
    <!-- Task panel -->
    <Style x:Key="TaskPanelStyle" TargetType="{x:Type Panel}">
        <Setter Property="Control.Padding" Value="10" />
        <Setter Property="Control.FontSize" Value="14" />
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
    </Style>
    <Style x:Key="TaskPropertyTextStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>
    <Style x:Key="TaskTagsPopupStyle" TargetType="{x:Type Popup}">
        <Setter Property="AllowsTransparency" Value="True" />
    </Style>
    <Style x:Key="TaskTagsPopupListStyle" TargetType="{x:Type ListBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border
                        Margin="0,1"
                        Padding="4,6"
                        CornerRadius="6"
                        BorderThickness="1"
                        BorderBrush="{StaticResource MilkifyGray}"
                        Background="White">
                        <ScrollViewer 
                            Padding="{TemplateBinding Padding}" 
                            KeyboardNavigation.IsTabStop="False">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Task note panel -->
    <Style x:Key="TaskNotePanelStyle" TargetType="{x:Type Panel}">
        <Setter Property="Control.Padding" Value="10" />
        <Setter Property="Control.FontSize" Value="14" />
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
    </Style>
    <Style x:Key="TaskNoteTitleStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="18" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>
    <Style x:Key="TaskNoteDateStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Foreground" Value="{StaticResource MilkifyDarkGreen}" />
    </Style>
    <Style x:Key="TaskNoteBodyAbstractStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="11" />
        <Setter Property="TextWrapping" Value="NoWrap" />
        <Setter Property="TextTrimming" Value="CharacterEllipsis" />
    </Style>
    <Style x:Key="TaskNoteBodyStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="11" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="Margin" Value="5,10" />
    </Style>
    
    
    <!-- 
    ***************************************************************************
    Miscellaneous Styles
    ***************************************************************************
    -->
    
    <!-- Tooltip styles -->
    <Style x:Key="TooltipBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="Control.FontSize" Value="11" />
    </Style>
    
    <!-- Text content -->
    <Style x:Key="HeadingTextStyle1" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="18" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Margin" Value="6,12" />
    </Style>
    <Style x:Key="HeadingTextStyle2" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Margin" Value="4,8" />
    </Style>
    <Style x:Key="ParagraphTextStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Margin" Value="2,4" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>
    <Style x:Key="ErrorTextStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ParagraphTextStyle}">
        <Setter Property="Foreground" Value="{StaticResource MilkifyRed}" />
        <Setter Property="FontWeight" Value="Bold" />
    </Style>
    <Style x:Key="TaskCheckBoxStyle" TargetType="{x:Type CheckBox}">
        <Setter Property="BorderBrush" Value="{StaticResource MilkifyDarkGray}" />
        <Setter Property="Template" Value="{StaticResource CheckBoxControlTemplate}" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" Value="{StaticResource MilkifyGreen}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="TaskPriorityTextStyle" TargetType="{x:Type Label}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Ellipse
                            Width="24"
                            Height="24"
                            Margin="1"
                            Fill="{Binding Converter={StaticResource PriorityColorConverter}}" />
                        <TextBlock
                            FontSize="16"
                            FontWeight="Bold"
                            FontFamily="./Fonts/#Myriad Pro"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="{Binding Converter={StaticResource PriorityTextConverter}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TaskRecurrenceIconStyle" TargetType="{x:Type Label}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image
                        Width="24"
                        Height="24"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center" 
                        Source="RepeatIcon.png"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Task list controls -->
    <Style x:Key="TaskListFilterComboStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}"/>
    <Style x:Key="TaskListSortComboStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}"/>

    <!-- Task controls -->
    <Style x:Key="TaskListComboStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="Margin" Value="0,2" />
    </Style>
    <Style x:Key="TaskPriorityComboStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="Margin" Value="0,2" />
    </Style>
    <Style x:Key="TaskLocationComboStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="Margin" Value="0,2" />
    </Style>



    <!-- 
    ***************************************************************************
    Popup Window Styles
    ***************************************************************************
    -->

    <!-- Window and window border -->
    <Style x:Key="PopupWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#FFFFFF" />
        <Setter Property="FontSize" Value="18" />
        <Setter Property="FontWeight" Value="Bold" />
    </Style>
    <Style x:Key="PopupWindowBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="12" />
        <Setter Property="Background" Value="{StaticResource MilkifyPopupColour}" />
        <Setter Property="Padding" Value="20" />
    </Style>
    <Style x:Key="PopupWindowInnerStyle"/>

    <!-- Text content -->
    <Style x:Key="PopupHeadingTextStyle1" TargetType="{x:Type TextBlock}">
        <Setter Property="Padding" Value="20" />
        <Setter Property="FontSize" Value="32" />
    </Style>

    <!-- Special lists -->
    <Style x:Key="PopupLabelListStyle" TargetType="{x:Type ListBox}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#FFFFFFFF" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <WrapPanel
                        IsItemsHost="True"
                        FlowDirection="LeftToRight" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock 
                        Text="{Binding}" 
                        Padding="10"/>
                    </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>